package com.xydtech.ecard.ftp.enums;

/**
 * @Author: liliya
 * @Description: sys_dict_data  业务品种
 * //TODO 需要单独维护,这里其实是存款的子类,而贷款属于大类,需要维护贷款、存款与其子类的关系对象
 * 贷款	    1	ftp_business_variety
 * 定期存款	2	ftp_business_variety
 * 个人活期	3	ftp_business_variety
 * 单位活期	4	ftp_business_variety
 * @Date: Created in 2023/8/15 19:25
 * @Modified:
 */

public enum FtpBusinessVarietyEnum {

    LOANS(1,"贷款"),
    FIXED_DEPOSIT(2,"定期存款"),
    PERSONAL_CURRENT_DEPOSIT(3,"个人活期存款"),
    UNIT_CURRENT_DEPOSIT(4,"单位活期存款");

    private int value;
    private String label;

    FtpBusinessVarietyEnum(int value, String label) {
        this.value = value;
        this.label = label;
    }

    public int getValue() {
        return value;
    }

    public String getLabel() {
        return label;
    }

    public static FtpBusinessVarietyEnum values(int code){
        for(FtpBusinessVarietyEnum enums : FtpBusinessVarietyEnum.values()){
            if(enums.getValue() == code){
                return enums;
            }
        }
        return null;
    }

}
